package com.ruoyi.game.api;

import com.ruoyi.common.core.constant.SecurityConstants;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.game.api.domin.GameItem;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

import java.util.List;

/**
 * 游戏物品
 *
 * @author : 小胖
 * @version : 1.0
 * @date : 2022/05/08  15:52
 **/
@FeignClient(contextId = "remoteGameItemService", value = ServiceNameConstants.SYSTEM_GAME)
public interface RemoteGameItemService
{
    /**
     * 批量添加游戏物品
     *
     * @param gameItems 游戏物品
     * @param source
     * @return
     */
    @PostMapping("item/batch")
    R<Boolean> add(@RequestBody List<GameItem> gameItems, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}
